Skip to contentSkip to conversation

simple fixes

PATCH In review Pavel Machek 2 participants 2 messages May 9, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 simple fixes

Fix typo in location-reporting-api.txt.

AFAICT, at_cmt_notify() calls ofono_error even in case stuff is okay. Fix that.

Move debug print to more useful place in setup_gobi().

Explain "delivery report" parameter in send-sms.

doc/location-reporting-api.txt +1 -1
index 21e346d4..ff0a35dc 100644
@@ -13,7 +13,7 @@ Methods		dict GetProperties()
 		filedescriptor Request()
 
 			Asks to turn ON the NMEA stream and supplies the
-			gps device file descriptor. The external cliend should
+			gps device file descriptor. The external client should
 			use the file descriptor to receive the NMEA data.
 
 			Possible Errors: [service].Error.InProgress
drivers/atmodem/sms.c +2 -0
index 68b89862..217971e7 100644
@@ -440,6 +436,8 @@ static void at_cmt_notify(GAtResult *result, gpointer user_data)
 	if (data->vendor != OFONO_VENDOR_SIMCOM)
 		at_ack_delivery(sms);
 
+	return;
+
 err:
 	ofono_error("Unable to parse CMT notification");
 }
plugins/udevng.c +2 -1
index ff5d41af..a4b18488 100644
@@ -233,10 +233,11 @@ static gboolean setup_gobi(struct modem_info *modem)
 		}
 	}
 
+	DBG("qmi=%s net=%s mdm=%s gps=%s diag=%s", qmi, net, mdm, gps, diag);
+	
 	if (qmi == NULL || mdm == NULL || net == NULL)
 		return FALSE;
 
-	DBG("qmi=%s net=%s mdm=%s gps=%s diag=%s", qmi, net, mdm, gps, diag);
 
 	ofono_modem_set_string(modem->modem, "Device", qmi);
 	ofono_modem_set_string(modem->modem, "Modem", mdm);
test/send-sms +1 -0
index 98808aaf..cabe0652 100755
@@ -6,6 +6,7 @@ import dbus
 if len(sys.argv) < 4:
 	print("Usage: %s [modem] <to> <message> <delivery report>" %\
 					(sys.argv[0]))
+        print("  where delivery report is 0|1")
 	sys.exit(1)
 
 bus = dbus.SystemBus()
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw

Hi Pavel,

Quoted 8 lines · Pavel Machek

Fix typo in location-reporting-api.txt.

AFAICT, at_cmt_notify() calls ofono_error even in case stuff is okay. Fix that.

Move debug print to more useful place in setup_gobi().

Explain "delivery report" parameter in send-sms.

These mostly look fine, but can you do me a favor and read HACKING, 'Submitting patches' section and break up this patch accordingly?

Quoted 49 lines
doc/location-reporting-api.txt +1 -1
index 21e346d4..ff0a35dc 100644
@@ -13,7 +13,7 @@ Methods		dict GetProperties()
  		filedescriptor Request()
 
  			Asks to turn ON the NMEA stream and supplies the
-			gps device file descriptor. The external cliend should
+			gps device file descriptor. The external client should
  			use the file descriptor to receive the NMEA data.
 
  			Possible Errors: [service].Error.InProgress
drivers/atmodem/sms.c +2 -0
index 68b89862..217971e7 100644
@@ -440,6 +436,8 @@ static void at_cmt_notify(GAtResult *result, gpointer user_data)
  	if (data->vendor != OFONO_VENDOR_SIMCOM)
  		at_ack_delivery(sms);
 
+	return;
+
  err:
  	ofono_error("Unable to parse CMT notification");
  }
plugins/udevng.c +2 -1
index ff5d41af..a4b18488 100644
@@ -233,10 +233,11 @@ static gboolean setup_gobi(struct modem_info *modem)
  		}
  	}
 
+	DBG("qmi=%s net=%s mdm=%s gps=%s diag=%s", qmi, net, mdm, gps, diag);
+	
  	if (qmi == NULL || mdm == NULL || net == NULL)
  		return FALSE;
 
-	DBG("qmi=%s net=%s mdm=%s gps=%s diag=%s", qmi, net, mdm, gps, diag);
 
  	ofono_modem_set_string(modem->modem, "Device", qmi);
  	ofono_modem_set_string(modem->modem, "Modem", mdm);
test/send-sms +0 -0
index 98808aaf..cabe0652 100755

test/send-sms import dbus · line 9

Quoted 4 lines
test/send-sms +1 -0
@@ -6,6 +6,7 @@ import dbus
  if len(sys.argv) < 4:
  	print("Usage: %s [modem] <to> <message> <delivery report>" %\
  					(sys.argv[0]))
+        print("  where delivery report is 0|1")

Something is funny with indentation here.

test/send-sms import dbus · line 12

Quoted 4 lines
test/send-sms +0 -0
  	sys.exit(1)
 
  bus = dbus.SystemBus()

Regards,
-Denis