summaryrefslogtreecommitdiff
path: root/test/messages_send_sms_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/messages_send_sms_test.c')
-rw-r--r--test/messages_send_sms_test.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/test/messages_send_sms_test.c b/test/messages_send_sms_test.c
index b4b96e3..d54cc53 100644
--- a/test/messages_send_sms_test.c
+++ b/test/messages_send_sms_test.c
@@ -3,6 +3,8 @@
#include <messages.h>
+#define TEST_NUMBER "00000000000"
+
void _sent_cb(messages_sending_result_e result, void *user_data)
{
}
@@ -28,18 +30,11 @@ int main(int argc, char *argv[])
return 1;
}
- messages_add_address(msg, "3488858734");
+ messages_add_address(msg, TEST_NUMBER, MESSAGES_RECIPIENT_TO);
messages_set_text(msg, "This is simple message!");
-
// send message
- ret = messages_set_message_sent_cb(svc, _sent_cb, NULL);
- if (MESSAGES_ERROR_NONE != ret) {
- printf("error: messages_set_message_sent_cb() = %d", ret);
- return 1;
- }
-
- ret = messages_send_message(svc, msg);
+ ret = messages_send_message(svc, msg, true, _sent_cb, NULL);
if (MESSAGES_ERROR_NONE != ret) {
printf("error: messages_send_message() = %d", ret);
return 1;