Am 11.04.2016 17:19, schrieb Stipe Tolj:
I'll prepare a simple patch that let's you resolve the issue.
please try to apply the following patch to the source tree and re-compile. -- Best Regards, Stipe Tolj ------------------------------------------------------------------- Düsseldorf, NRW, Germany Kannel Foundation tolj.org system architecture http://www.kannel.org/ http://www.tolj.org/ stolj at kannel.org st at tolj.org -------------------------------------------------------------------
Index: gw/bb_http.c =================================================================== --- gw/bb_http.c (revision 5150) +++ gw/bb_http.c (working copy) @@ -347,24 +347,19 @@ return octstr_create("Black/white lists re-loaded"); } -static Octstr *httpd_remove_message(List *cgivars, int status_type) +static Octstr *httpd_dequeue_messages(List *cgivars, int status_type) { Octstr *reply; - Octstr *message_id; + Octstr *smsc; if ((reply = httpd_check_authorization(cgivars, 0))!= NULL) return reply; if ((reply = httpd_check_status())!= NULL) return reply; /* check if the smsc id is given */ - message_id = http_cgi_variable(cgivars, "id"); - if (message_id) { - if (octstr_len(message_id) != UUID_STR_LEN) - return octstr_format("Message id should be %d characters long", UUID_STR_LEN); - if (bb_remove_message(message_id) == -1) - return octstr_format("Could not remove message id `%s'", octstr_get_cstr(message_id)); - else - return octstr_format("Message id `%s' removed", octstr_get_cstr(message_id)); - } else - return octstr_create("Message id not given"); + smsc = http_cgi_variable(cgivars, "smsc"); + if (smsc) { + } else { + + } } /* Known httpd commands and their functions */ @@ -387,7 +382,7 @@ { "add-smsc", httpd_add_smsc }, { "remove-smsc", httpd_remove_smsc }, { "reload-lists", httpd_reload_lists }, - { "remove-message", httpd_remove_message }, + { "dequeue", httpd_dequeue_messages }, { NULL , NULL } /* terminate list */ }; Index: gw/smsc/smsc_smpp.c =================================================================== --- gw/smsc/smsc_smpp.c (revision 5150) +++ gw/smsc/smsc_smpp.c (working copy) @@ -609,8 +609,10 @@ /* * Follows SMPP spec. v3.4. issue 1.2 * it's not allowed to have destination_addr NULL + * USSD service type MAY have a NULL value, so allow this. */ - if (pdu->u.deliver_sm.destination_addr == NULL) { + if (pdu->u.deliver_sm.destination_addr == NULL && + octstr_case_compare(pdu->u.deliver_sm.service_type, octstr_imm("USSD")) != 0) { error(0, "SMPP[%s]: Malformed destination_addr `%s', may not be empty. " "Discarding MO message.", octstr_get_cstr(smpp->conn->id), octstr_get_cstr(pdu->u.deliver_sm.destination_addr));