buggnokii - Bugs: bug #32361, fetchin sms from gnokii api, and...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #32361: fetchin sms from gnokii api, and ubuntu get crash

Submitted by:  capede <capede>
Submitted on:  Sat 05 Feb 2011 08:47:49 AM UTC  
 
Category: libgnokiiSeverity: 3 - Normal
Item Group: crashStatus: Invalid
Privacy: PublicAssigned to: Pawel Kot <pkot>
Open/Closed: Closed

Sat 05 Feb 2011 02:06:14 PM UTC, comment #1:

Hi,

I don't think it is a good practice to ask the same questions all over various forums even not waiting for any answer.

Please see the answer at http://stackoverflow.com/questions/4906430/gnokii-api-error/4907193#4907193

Pawel Kot <pkot>
Project AdministratorIn charge of this item.
Sat 05 Feb 2011 08:47:49 AM UTC, original submission:

code
-----
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <gnokii.h>

#define CONFIG_FILE NULL
struct gn_statemachine *state;

void terminate(void)
{
gn_lib_phone_close(state);
gn_lib_phoneprofile_free(&state);
gn_lib_library_free();
}

void init(void)
{
gn_error error;

atexit(init);

if((error = gn_lib_phoneprofile_load(CONFIG_FILE,&state)) != GN_ERR_NONE)
{
fprintf(stderr,"%s\n",gn_error_print(error));
exit(2);
}

}

int main()
{
gn_data data;
gn_error error;
gn_phone *phone = &state->driver.phone;

//handle output var
gn_sms_folder folder;
gn_sms_folder_list folder_list;
gn_sms message;

char *memory_type_string = "SM";
char *message_text;

//set memory type
//gn_str2memory_type("SM") == GN_MT_XX ? printf("memory SM eror") : "";

//get sms
printf("Getting Message #%d from %s",(int)1,memory_type_string);

init();

memset(&message,0,sizeof(gn_sms));
gn_data_clear(&data);
data.sms = &message;

message.memory_type = gn_str2memory_type(memory_type_string);
message.number = 1;
gn_error e;
if(e = gn_sm_functions(GN_OP_GetSMS, &data, state) != GN_ERR_NONE)
{

fprintf(stdout,"%s\n",message.user_data[0].u.text);
}

return 0;
}
-----

hi folks,
here im gonna tryin to fetch some sms from my phone simcard, and after compiled, then run, but suddenly my ubuntu get crashed at all, what parameter that i had forgotten to be input ? is there no notification from this api when the parameter is insufficient ? e.g : gtk, when i forgot insert gtk_init, they'll notice me somehow in output error.

look forward for y'all response ;)

capede <capede>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pkot (Posted a comment)
  • -unavailable- added by capede (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 05 Feb 2011 02:06:14 PM UTCpkotStatusNone=>Invalid
      Assigned toNone=>pkot
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1