X-Git-Url: http://git.harvie.cz/?p=mirrors%2Flibpurple-core-answerscripts.git;a=blobdiff_plain;f=answerscripts.c;h=3e629db9a4191d6e118556a35f0868d9de96069f;hp=0ad50d7c70a0e30f118bf1691219902078215f11;hb=c8c87c89d514a480b7d815af78afe86d78d36c16;hpb=10a3ed036e46943ef3c5b662d4b5299055f3b78a diff --git a/answerscripts.c b/answerscripts.c index 0ad50d7..3e629db 100755 --- a/answerscripts.c +++ b/answerscripts.c @@ -46,7 +46,10 @@ typedef struct { } answerscripts_job; const void *check_null(const void *pointer) { - if(pointer == NULL) return ""; + if(pointer == NULL) { + fprintf(stderr, "NULL pointer detected in answerscripts!\n"); + return ""; + } return pointer; } @@ -220,7 +223,7 @@ static PurplePluginInfo info = { "core-answerscripts", "AnswerScripts", - "0.5.3", + "0.5.4", "Framework for hooking scripts to process received messages for libpurple clients", "\nThis plugin will execute script \"~/.purple/" ANSWERSCRIPT "\" " "(or any other executable called \"" ANSWERSCRIPT "\" and found in purple_user_dir()) " @@ -248,12 +251,12 @@ static PurplePluginInfo info = { static void init_plugin(PurplePlugin * plugin) { //Export static environment variables - #ifndef __x86_64__ //Workaround for x86_64 (where this causes problems for unknown reason) + //#ifndef __x86_64__ //Workaround for x86_64 (where this causes problems for unknown reason) const char * core_ui = check_null(purple_core_get_ui()); const char * core_version = check_null(purple_core_get_version()); setenv(ENV_PREFIX "L_AGENT", (char *) core_ui, 1); //ID of IM client used with answerscripts setenv(ENV_PREFIX "L_AGENT_VERSION", (char *) core_version, 1); //Version of client - #endif + //#endif } PURPLE_INIT_PLUGIN(autoanswer, init_plugin, info)