[PATCH] libosmocore[master]: gsm0480: parse GSM0480_MTYPE_FACILITY separately

2018-01-14 Thread Vadim Yanitskiy
Hello Alexander Chemeris, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/3377

to look at the new patch set (#8).

gsm0480: parse GSM0480_MTYPE_FACILITY separately

Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
---
M src/gsm/gsm0480.c
1 file changed, 17 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/77/3377/8

diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index 9e71a86..7b0fa6d 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -196,6 +196,8 @@
 /* Forward declarations */
 static int parse_ss(const struct gsm48_hdr *hdr,
uint16_t len, struct ss_request *req);
+static int parse_ss_facility(const uint8_t *ss_facility, uint16_t len,
+struct ss_request *req);
 static int parse_ss_info_elements(const uint8_t *ussd_ie, uint16_t len,
  struct ss_request *req);
 static int parse_facility_ie(const uint8_t *facility_ie, uint16_t length,
@@ -286,8 +288,10 @@
req->ussd_text[0] = 0xFF;
break;
case GSM0480_MTYPE_REGISTER:
-   case GSM0480_MTYPE_FACILITY:
rc &= parse_ss_info_elements(>data[0], len - sizeof(*hdr), 
req);
+   break;
+   case GSM0480_MTYPE_FACILITY:
+   rc &= parse_ss_facility(>data[0], len - sizeof(*hdr), req);
break;
default:
LOGP(0, LOGL_DEBUG, "Unknown GSM 04.80 message-type field 
0x%02x\n",
@@ -299,6 +303,18 @@
return rc;
 }
 
+static int parse_ss_facility(const uint8_t *ss_facility, uint16_t len,
+struct ss_request *req)
+{
+   uint8_t facility_length;
+
+   facility_length = ss_facility[0];
+   if (len - 1 < facility_length)
+   return 0;
+
+   return parse_facility_ie(ss_facility + 1, facility_length, req);
+}
+
 static int parse_ss_info_elements(const uint8_t *ss_ie, uint16_t len,
  struct ss_request *req)
 {

-- 
To view, visit https://gerrit.osmocom.org/3377
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
Gerrit-PatchSet: 8
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder


libosmocore[master]: gsm0480: parse GSM0480_MTYPE_FACILITY separately

2018-01-12 Thread Harald Welte

Patch Set 7: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3377
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
Gerrit-PatchSet: 7
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


libosmocore[master]: gsm0480: parse GSM0480_MTYPE_FACILITY separately

2018-01-10 Thread Alexander Chemeris

Patch Set 6: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/3377
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
Gerrit-PatchSet: 6
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] libosmocore[master]: gsm0480: parse GSM0480_MTYPE_FACILITY separately

2018-01-10 Thread Vadim Yanitskiy
Hello Alexander Chemeris, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/3377

to look at the new patch set (#6).

gsm0480: parse GSM0480_MTYPE_FACILITY separately

Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
---
M src/gsm/gsm0480.c
1 file changed, 17 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/77/3377/6

diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index ecbea8c..d717270 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -196,6 +196,8 @@
 /* Forward declarations */
 static int parse_ss(const struct gsm48_hdr *hdr,
uint16_t len, struct gsm0480_ss_request *req);
+static int parse_ss_facility(const uint8_t *ss_facility, uint16_t len,
+struct gsm0480_ss_request *req);
 static int parse_ss_info_elements(const uint8_t *ussd_ie, uint16_t len,
  struct gsm0480_ss_request *req);
 static int parse_facility_ie(const uint8_t *facility_ie, uint16_t length,
@@ -281,8 +283,10 @@
req->ussd_text[0] = 0xFF;
break;
case GSM0480_MTYPE_REGISTER:
-   case GSM0480_MTYPE_FACILITY:
rc &= parse_ss_info_elements(>data[0], len - sizeof(*hdr), 
req);
+   break;
+   case GSM0480_MTYPE_FACILITY:
+   rc &= parse_ss_facility(>data[0], len - sizeof(*hdr), req);
break;
default:
LOGP(0, LOGL_DEBUG, "Unknown GSM 04.80 message-type field 
0x%02x\n",
@@ -294,6 +298,18 @@
return rc;
 }
 
+static int parse_ss_facility(const uint8_t *ss_facility, uint16_t len,
+struct gsm0480_ss_request *req)
+{
+   uint8_t facility_length;
+
+   facility_length = ss_facility[0];
+   if (len - 1 < facility_length)
+   return 0;
+
+   return parse_facility_ie(ss_facility + 1, facility_length, req);
+}
+
 static int parse_ss_info_elements(const uint8_t *ss_ie, uint16_t len,
  struct gsm0480_ss_request *req)
 {

-- 
To view, visit https://gerrit.osmocom.org/3377
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
Gerrit-PatchSet: 6
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder


[PATCH] libosmocore[master]: gsm0480: parse GSM0480_MTYPE_FACILITY separately

2018-01-10 Thread Vadim Yanitskiy
Hello Alexander Chemeris, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/3377

to look at the new patch set (#5).

gsm0480: parse GSM0480_MTYPE_FACILITY separately

Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
---
M src/gsm/gsm0480.c
1 file changed, 17 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/77/3377/5

diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index ecbea8c..d717270 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -196,6 +196,8 @@
 /* Forward declarations */
 static int parse_ss(const struct gsm48_hdr *hdr,
uint16_t len, struct gsm0480_ss_request *req);
+static int parse_ss_facility(const uint8_t *ss_facility, uint16_t len,
+struct gsm0480_ss_request *req);
 static int parse_ss_info_elements(const uint8_t *ussd_ie, uint16_t len,
  struct gsm0480_ss_request *req);
 static int parse_facility_ie(const uint8_t *facility_ie, uint16_t length,
@@ -281,8 +283,10 @@
req->ussd_text[0] = 0xFF;
break;
case GSM0480_MTYPE_REGISTER:
-   case GSM0480_MTYPE_FACILITY:
rc &= parse_ss_info_elements(>data[0], len - sizeof(*hdr), 
req);
+   break;
+   case GSM0480_MTYPE_FACILITY:
+   rc &= parse_ss_facility(>data[0], len - sizeof(*hdr), req);
break;
default:
LOGP(0, LOGL_DEBUG, "Unknown GSM 04.80 message-type field 
0x%02x\n",
@@ -294,6 +298,18 @@
return rc;
 }
 
+static int parse_ss_facility(const uint8_t *ss_facility, uint16_t len,
+struct gsm0480_ss_request *req)
+{
+   uint8_t facility_length;
+
+   facility_length = ss_facility[0];
+   if (len - 1 < facility_length)
+   return 0;
+
+   return parse_facility_ie(ss_facility + 1, facility_length, req);
+}
+
 static int parse_ss_info_elements(const uint8_t *ss_ie, uint16_t len,
  struct gsm0480_ss_request *req)
 {

-- 
To view, visit https://gerrit.osmocom.org/3377
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
Gerrit-PatchSet: 5
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder


[PATCH] libosmocore[master]: gsm0480: parse GSM0480_MTYPE_FACILITY separately

2018-01-09 Thread Vadim Yanitskiy
Hello Alexander Chemeris, Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/3377

to look at the new patch set (#4).

gsm0480: parse GSM0480_MTYPE_FACILITY separately

Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
---
M src/gsm/gsm0480.c
1 file changed, 17 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/77/3377/4

diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index ecbea8c..d717270 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -196,6 +196,8 @@
 /* Forward declarations */
 static int parse_ss(const struct gsm48_hdr *hdr,
uint16_t len, struct gsm0480_ss_request *req);
+static int parse_ss_facility(const uint8_t *ss_facility, uint16_t len,
+struct gsm0480_ss_request *req);
 static int parse_ss_info_elements(const uint8_t *ussd_ie, uint16_t len,
  struct gsm0480_ss_request *req);
 static int parse_facility_ie(const uint8_t *facility_ie, uint16_t length,
@@ -281,8 +283,10 @@
req->ussd_text[0] = 0xFF;
break;
case GSM0480_MTYPE_REGISTER:
-   case GSM0480_MTYPE_FACILITY:
rc &= parse_ss_info_elements(>data[0], len - sizeof(*hdr), 
req);
+   break;
+   case GSM0480_MTYPE_FACILITY:
+   rc &= parse_ss_facility(>data[0], len - sizeof(*hdr), req);
break;
default:
LOGP(0, LOGL_DEBUG, "Unknown GSM 04.80 message-type field 
0x%02x\n",
@@ -294,6 +298,18 @@
return rc;
 }
 
+static int parse_ss_facility(const uint8_t *ss_facility, uint16_t len,
+struct gsm0480_ss_request *req)
+{
+   uint8_t facility_length;
+
+   facility_length = ss_facility[0];
+   if (len - 1 < facility_length)
+   return 0;
+
+   return parse_facility_ie(ss_facility + 1, facility_length, req);
+}
+
 static int parse_ss_info_elements(const uint8_t *ss_ie, uint16_t len,
  struct gsm0480_ss_request *req)
 {

-- 
To view, visit https://gerrit.osmocom.org/3377
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
Gerrit-PatchSet: 4
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder


libosmocore[master]: gsm0480: parse GSM0480_MTYPE_FACILITY separately

2017-08-09 Thread Harald Welte

Patch Set 3: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3377
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


libosmocore[master]: gsm0480: parse GSM0480_MTYPE_FACILITY separately

2017-07-30 Thread Alexander Chemeris

Patch Set 3: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/3377
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] libosmocore[master]: gsm0480: parse GSM0480_MTYPE_FACILITY separately

2017-07-29 Thread Vadim Yanitskiy

gsm0480: parse GSM0480_MTYPE_FACILITY separately

Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
---
M src/gsm/gsm0480.c
1 file changed, 17 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/77/3377/2

diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index 87095d2..e8a3bc3 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -194,6 +194,8 @@
 /* Forward declarations */
 static int parse_ss(const struct gsm48_hdr *hdr,
uint16_t len, struct ss_request *req);
+static int parse_ss_facility(const uint8_t *ss_facility, uint16_t len,
+struct ss_request *req);
 static int parse_ss_info_elements(const uint8_t *ussd_ie, uint16_t len,
  struct ss_request *req);
 static int parse_facility_ie(const uint8_t *facility_ie, uint16_t length,
@@ -272,8 +274,10 @@
req->ussd_text[0] = 0xFF;
break;
case GSM0480_MTYPE_REGISTER:
-   case GSM0480_MTYPE_FACILITY:
rc &= parse_ss_info_elements(>data[0], len - sizeof(*hdr), 
req);
+   break;
+   case GSM0480_MTYPE_FACILITY:
+   rc &= parse_ss_facility(>data[0], len - sizeof(*hdr), req);
break;
default:
LOGP(0, LOGL_DEBUG, "Unknown GSM 04.80 message-type field 
0x%02x\n",
@@ -285,6 +289,18 @@
return rc;
 }
 
+static int parse_ss_facility(const uint8_t *ss_facility, uint16_t len,
+struct ss_request *req)
+{
+   uint8_t facility_length;
+
+   facility_length = ss_facility[0];
+   if (len - 1 < facility_length)
+   return 0;
+
+   return parse_facility_ie(ss_facility + 1, facility_length, req);
+}
+
 static int parse_ss_info_elements(const uint8_t *ss_ie, uint16_t len,
  struct ss_request *req)
 {

-- 
To view, visit https://gerrit.osmocom.org/3377
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 


[PATCH] libosmocore[master]: gsm0480: parse GSM0480_MTYPE_FACILITY separately

2017-07-29 Thread Vadim Yanitskiy

Review at  https://gerrit.osmocom.org/3377

gsm0480: parse GSM0480_MTYPE_FACILITY separately

Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
---
M src/gsm/gsm0480.c
1 file changed, 17 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/77/3377/1

diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index 87095d2..e8a3bc3 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -194,6 +194,8 @@
 /* Forward declarations */
 static int parse_ss(const struct gsm48_hdr *hdr,
uint16_t len, struct ss_request *req);
+static int parse_ss_facility(const uint8_t *ss_facility, uint16_t len,
+struct ss_request *req);
 static int parse_ss_info_elements(const uint8_t *ussd_ie, uint16_t len,
  struct ss_request *req);
 static int parse_facility_ie(const uint8_t *facility_ie, uint16_t length,
@@ -272,8 +274,10 @@
req->ussd_text[0] = 0xFF;
break;
case GSM0480_MTYPE_REGISTER:
-   case GSM0480_MTYPE_FACILITY:
rc &= parse_ss_info_elements(>data[0], len - sizeof(*hdr), 
req);
+   break;
+   case GSM0480_MTYPE_FACILITY:
+   rc &= parse_ss_facility(>data[0], len - sizeof(*hdr), req);
break;
default:
LOGP(0, LOGL_DEBUG, "Unknown GSM 04.80 message-type field 
0x%02x\n",
@@ -285,6 +289,18 @@
return rc;
 }
 
+static int parse_ss_facility(const uint8_t *ss_facility, uint16_t len,
+struct ss_request *req)
+{
+   uint8_t facility_length;
+
+   facility_length = ss_facility[0];
+   if (len - 1 < facility_length)
+   return 0;
+
+   return parse_facility_ie(ss_facility + 1, facility_length, req);
+}
+
 static int parse_ss_info_elements(const uint8_t *ss_ie, uint16_t len,
  struct ss_request *req)
 {

-- 
To view, visit https://gerrit.osmocom.org/3377
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e029c436a50fa8c2823ea39c5d123ee701becfa
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy