Presumably not your problem here, but:
Note that the above test is incorrect!
A non-zero value for uart_hdl is not necessarily an error!
(unfortunately, this bad practice is illustrated in some of the Wavecom samples!)
The correct test for an error is:
if( result < OK )