Dusting off my Growl Library December 21st, 2011
Patrick Stein

I’ve spent the last few hours dusting off my Common Lisp Growl client library. The last time I worked on it was before the Mac Growl Application supported GNTP (Growl Notification Transport Protocol).

Today, working on it, I’m not quite sure what’s up, but I am not succeeding in communicating with the server using encryption. I’ll have to look more closely. Last time that I worked on it, I extended Ironclad, but I never got those changes pushed fully into Ironclad’s main line. But, I think I’m using the same version of Ironclad that I was using when I tested against the Windows Growl Application. *shrug*

I’ve also run into a snag with the Callbacks. Essentially, your Lisp program could get a callback when the user has clicked on your Growl notification. This actually works except for the fact that I am calling READ-SEQUENCE into a buffer that is longer than the message. The server, I believe, is supposed to close the socket after the callback. But, it does not. So, I am stuck waiting for more bytes that will never come.

Now, I either have to do one of the following:

  • refactor it to use READ-LINE instead
  • switch from using USocket to using IOLib (and hope that :dont-wait works as expected)
  • extend USocket to support SOCKET-RECEIVE even on TCP sockets

Anyone have a preference?

2 Responses to “Dusting off my Growl Library”

  1. 2011-12-29 @ 9:01 PM

    Are you having trouble using encryption with the Mac version or with the Windows version? The Mac version does not yet support encryption, so encrypted notifications will fail and should return the appropriate GNTP error response. The Windows version still supports all of the specified encryption options and should work fine if it was working fine before.

    • pat
      2011-12-29 @ 10:29 PM

      When I wrote the library, the Mac version didn’t support GNTP at all. Then, I tested on my son’s Win 7 laptop. This time around, I was testing on my Mac.

      I was getting an error message, but it was not the correct one. It said:

      GNTP/1.0 -ERROR NONE
      Response-Action: REGISTER
      Error-Description: (null)
      Error-Code: 2

      I suppose none of the listed Error-Codes in the GNTP doc really fit, but “(null)” and “2” gave me no clue what went wrong, if it was my fault, how to get more info, etc.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <br> <cite> <code> <dd> <del datetime=""> <dl> <dt> <em> <i> <img alt="" height="" longdesc="" src="" width=""> <ins datetime="" cite=""> <li> <ol> <p> <q cite=""> <s> <strike> <strong> <sub> <sup> <u> <ul>

l