if ( svcInfoBase != NULL ) {
_D("local service instance already exists");
svcInfo = reinterpret_cast<AppCommServiceInfo*>(svcInfoBase);
-
- if (svcInfo == NULL) {
- _D("casting failed");
- return CONV_ERROR_INVALID_OPERATION;
- }
} else {
_D("allocating new service instance for local service");
svcInfo = new(std::nothrow) AppCommServiceInfo();
if ( svcInfoBase != NULL ) {
_D("service instance already exists");
svcInfo = reinterpret_cast<AppCommServiceInfo*>(svcInfoBase);
-
- if (svcInfo == NULL) {
- _D("casting failed");
- return CONV_ERROR_INVALID_OPERATION;
- }
} else {
_D("allocating new service instance");
svcInfo = new(std::nothrow) AppCommServiceInfo();
if (svcInfoBase != NULL) {
_D("service instance already exists");
svcInfo = reinterpret_cast<RemoteAppControlServiceInfo*>(svcInfoBase);
-
- if (svcInfo == NULL)
- {
- _D("casting failed");
- return CONV_ERROR_INVALID_OPERATION;
- }
} else {
_D("allocating new service instance");
svcInfo = new(std::nothrow) RemoteAppControlServiceInfo();
handleError(string(), Error::create("Not Connected"));
return;
} else {
- if (write_buf_index == 999 && write_buf_count != 999) {
+ if (write_buf_index == 999) {
write_buf_index = 0;
}
- if (write_buf_count == 999) {
- }
-
write_buf_index++;
write_buf_count++;
l += snprintf((char *)&prepare_buf[LWS_SEND_BUFFER_PRE_PADDING],
prepare_buf_size - LWS_SEND_BUFFER_PRE_PADDING, "%s", data);
- if (write_buf_index == 999 && write_buf_count != 999) {
+ if (write_buf_index == 999) {
write_buf_index = 0;
}
- if (write_buf_count == 999) {
- }
-
write_buf_index++;
write_buf_count++;