Hi Alex,
I am very sorry. My apologies for the missunderstanding. My impression is
that identation means replacing tabs with spaces and aligning left text
according to level. I see here that you are actually asking about source
code reformatting and even for a code change. Some of the styling options
that you ask, especially that "if" statement, are unreadable by several
people, including me. Well, not exactly unreadable, but very difficult to
read. And that is a problem in the case of the author who is called to
support it. Who decided on this style anyway?
But that's another story. More on the issue; through testing, I have
discovered several weaknesses and bugs in the implimentation, so I decided
to write it from scratch and call it test/fakesmpp. I have changed the flow,
making it more of an SMSc, preserved and improved on component isolation and
benchmarks, while at the same time added support for transceiver-mode, dual
port configurations and DLRs. I also moved most of the command-line options
to main configuration, and it will do a thorough check and validation.of the
main SMPP configuration. It will be submitted shortly.
This patch is retracted.
BR,
Nikos
----- Original Message -----
From: "Alexander Malysh" <[email protected]>
To: "Nikos Balkanas" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, July 01, 2010 11:04 AM
Subject: Re: Patch: test/drive_smpp.c
Hi Nikos,
if you write "fixed indentation" then I assume it's fixed. But as far as I
see it's not and your fix made it even worse...
Please fix it and provide doc and I will commit it.
Thanks in advance.
Here are comments:
+#define MAX_SMS_OCTETS 140
+#define CATENATE_UDH_LEN 5
dont' redefine it, just include sms.h
+static Octstr *SMS = NULL;
please use downcase..
+ if (SMS)
+ {
please use
if () {
...
} else {
...
}
+ goto single;
it's not needed, why not just if (sms && octstr_len(SMS) <= (MAX_SMS_OCTETS
* 8)/7) ...
+ uchar *start = octstr_get_cstr(SMS), *p = start, *end, c;
kill extra chars between uchar & *start
+ if (len%part_len) num_msgs++;
if you think it's readable then it's not, please use:
+ if (len % part_len)
num_msgs++;
+ pdu = smpp_pdu_create(deliver_sm, counter_increase
+ (message_id_counter));
hmm such line truncate is not very helpful...
+ debug("smpp.test", 0, "Announcing smsbox %s to bearerbox",
octstr_get_cstr
+ (smsbox_id));
ditto...
Am 01.07.2010 um 06:29 schrieb Nikos Balkanas:
Hi,
Fixed identation. Beafed up smsbox_thread and routed most variables to
configuration. Uses main kannel configuration. Just add an smpp smsc
definition to 127.0.0.1 for it. It will test main kannel configuration in
addition to TLVs. As already mentioned I extended its functionality to
handle external messaging and concatenation. It is a FAKE smpp server,
that also, benchmarks bearerbox's SMPP implementation.
Anyone interested, please grab. If it makes it to kannel, i will also
provide documentation.
BR,
Nikos
<drive_smpp.diff>