There was a bug in a patch I sent on 23rd Dec. It could cause segfaults in mmsbox. I'm attaching a corrected version against current CVS source.
--- mbuni-cvs-orig/extras/mmsbox-mm1/mmsbox_mm1.c +++ mbuni-cvs/extras/mmsbox-mm1/mmsbox_mm1.c @@ -344,11 +344,15 @@ mms_info(0, "mmsbox-mm1", NULL, "sent message, type=%s, result=%s", mms_message_type_to_cstr(mms_messagetype(m)), r->error ? octstr_get_cstr(r->error) : "(none)"); /* destroy the structure. */ + if(r->error && (octstr_compare(r->error, octstr_imm("Error-service-denied")) == 0 || + octstr_compare(r->error, octstr_imm("Error-permanent-failure")) == 0)) + *retry = 0; + else + *retry = 1; pthread_cond_destroy(&r->cond); pthread_mutex_destroy(&r->mutex); gw_free(r); - *retry = 1; /* always retry ?? */ return id; } @@ -491,9 +495,17 @@ mms_warning(0, "mmsbox-mm1", NULL,"No send-conf returned by operator"); if (m == NULL || - (r->result = mms_get_header_value(m, octstr_imm("Message-ID"))) == NULL) { + (r->result = mms_get_header_value(m, octstr_imm("Message-ID"))) == NULL || + octstr_compare(mms_get_header_value(m, octstr_imm("X-Mms-Response-Status")), + octstr_imm("Ok")) != 0 + ) { Octstr *err = m ? mms_get_header_value(m, octstr_imm("X-Mms-Response-Text")) : NULL; Octstr *status = m ? mms_get_header_value(m, octstr_imm("X-Mms-Response-Status")) : NULL; + if(status && (octstr_compare(status, octstr_imm("Error-service-denied")) == 0 || + octstr_compare(status, octstr_imm("Error-permanent-failure")) == 0)) { + r->error = octstr_duplicate(status); + } + r->result = NULL; /* indicate failure to bearerbox */ mms_error(0, "mmsbox-mm1", NULL, "Sending failed: %s, %s!", err ? octstr_get_cstr(err) : "(none)", status ? octstr_get_cstr(status) : "(none)");
pgpdIvMXsDHzp.pgp
Description: PGP signature
_______________________________________________ Devel mailing list Devel@mbuni.org http://lists.mbuni.org/mailman/listinfo/devel