[Pkg-voip-commits] [libre] 06/12: sipreg: add from_name (Display Name) (#104)

Jonas Smedegaard dr at jones.dk
Thu Feb 1 20:08:31 UTC 2018


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.5.7-1
in repository libre.

commit 0b1f01f4525216594d1dcf3c49fbd360d25cb279
Author: Alfred E. Heggestad <alfred.heggestad at gmail.com>
Date:   Mon Jan 8 08:55:26 2018 +0100

    sipreg: add from_name (Display Name) (#104)
---
 include/re_sipreg.h | 3 ++-
 src/sipreg/reg.c    | 6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/re_sipreg.h b/include/re_sipreg.h
index 361d6db..a0c1bae 100644
--- a/include/re_sipreg.h
+++ b/include/re_sipreg.h
@@ -8,7 +8,8 @@ struct sipreg;
 
 
 int sipreg_register(struct sipreg **regp, struct sip *sip, const char *reg_uri,
-		    const char *to_uri, const char *from_uri, uint32_t expires,
+		    const char *to_uri, const char *from_name,
+		    const char *from_uri, uint32_t expires,
 		    const char *cuser, const char *routev[], uint32_t routec,
 		    int regid, sip_auth_h *authh, void *aarg, bool aref,
 		    sip_resp_h *resph, void *arg,
diff --git a/src/sipreg/reg.c b/src/sipreg/reg.c
index 1905195..3967200 100644
--- a/src/sipreg/reg.c
+++ b/src/sipreg/reg.c
@@ -306,6 +306,7 @@ static int request(struct sipreg *reg, bool reset_ls)
  * @param sip      SIP Stack instance
  * @param reg_uri  SIP Request URI
  * @param to_uri   SIP To-header URI
+ * @param from_name  SIP From-header display name (optional)
  * @param from_uri SIP From-header URI
  * @param expires  Registration interval in [seconds]
  * @param cuser    Contact username
@@ -323,7 +324,8 @@ static int request(struct sipreg *reg, bool reset_ls)
  * @return 0 if success, otherwise errorcode
  */
 int sipreg_register(struct sipreg **regp, struct sip *sip, const char *reg_uri,
-		    const char *to_uri, const char *from_uri, uint32_t expires,
+		    const char *to_uri, const char *from_name,
+		    const char *from_uri, uint32_t expires,
 		    const char *cuser, const char *routev[], uint32_t routec,
 		    int regid, sip_auth_h *authh, void *aarg, bool aref,
 		    sip_resp_h *resph, void *arg,
@@ -340,7 +342,7 @@ int sipreg_register(struct sipreg **regp, struct sip *sip, const char *reg_uri,
 	if (!reg)
 		return ENOMEM;
 
-	err = sip_dialog_alloc(&reg->dlg, reg_uri, to_uri, NULL, from_uri,
+	err = sip_dialog_alloc(&reg->dlg, reg_uri, to_uri, from_name, from_uri,
 			       routev, routec);
 	if (err)
 		goto out;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/libre.git



More information about the Pkg-voip-commits mailing list